﻿using System;

using Moe.ECamel.Common.Entities;

namespace Moe.ECamel.Server.BL
{
	/// <summary>
	/// Base class for common business logic components.
	/// </summary>
	public abstract class ECamelBL : IDisposable
	{
		/// <summary>
		/// Data context to be used by this component's operations.
		/// </summary>
		protected ECamelDataContext dataContext;

		/// <summary>
		/// Default constructor for business logic component.
		/// </summary>
		/// <param name="dataContext">Data context to be used by this component's operations.</param>
		protected ECamelBL(ECamelDataContext dataContext)
		{
			this.dataContext = dataContext;
		}

		#region IDisposable Members

		/// <summary>
		/// Release resources used by this component.
		/// </summary>
		public virtual void Dispose()
		{
			// Release reference to data context:
			this.dataContext = null;
		}

		#endregion
	}
}